#ifndef CT_VOIP_H_
#define CT_VOIP_H_
#include "ctType.h"

//debug macro for lilian
//#define LILIAN_LOG_PACK_STREAM
//#define LILIAN_LOG_PACK_RESEND
//#define LILIAN_MAKE_LOST_S_R            //simulate packet lost for Server->RelayServer
//#define LILIAN_MAKE_LOST_R_S            //simulate packet lost for RelayServer->Server
//#define LILIAN_MAKE_LOST_C_S            //simulate packet lost for Client->Server
//#define LILIAN_MAKE_LOST_S_C            //simulate packet lost for Server->Client

struct stVOIPConfig 
{
        stVOIPConfig()
        {
                id_ = 0;

                udp_ip_ = "";
                udp_port_ = 0;

                tcp_port_ = 0;

                relay_ip_ = "";

                relay_server_ip_   = "";
                relay_server_port_ = 0;

                tcp_port_ = udp_port_;
        }
        stVOIPConfig & operator=(const stVOIPConfig &rh)
        {
                id_ = rh.id_;

                udp_ip_         = rh.udp_ip_;
                udp_port_       = rh.udp_port_;

                tcp_port_       = rh.tcp_port_;

                relay_ip_       = rh.relay_ip_;

                relay_server_ip_   = rh.relay_server_ip_;
                relay_server_port_ = rh.relay_server_port_;

                return *this;
        }
        //id
        WORD id_;
        //用户连接的UDP地址
        std::string udp_ip_;
        WORD udp_port_;

        //用户连接的TCP地址
        WORD tcp_port_;

        //本机连接语音中转的地址
        std::string relay_ip_;
        
        //中转地址
        std::string relay_server_ip_;
        WORD relay_server_port_;
};

#endif //CT_VOIP_H_
